package jkim.plugin.daframe.ext.sql.model;

import java.util.Properties;

import jkim.plugin.daframe.ext.sql.util.DaframeSQLUtils;

import org.eclipse.core.internal.resources.File;
import org.eclipse.core.internal.resources.Folder;
import org.eclipse.core.resources.IResource;

public class DaframeSQLLoggerSetupInfo {

	public static int VALUE_SIZE = 3;
	private String projectName;
	private Folder projectFolder;
	private Folder webinfFolder;
	private Folder tsqlFolder;
	private String daframeLogFilePath;
	private Properties frameworkConfProperties;
	private Properties logConfProperties;
	
	/**
	 * @param name
	 */
	public DaframeSQLLoggerSetupInfo(String name, Folder projectFolder, Folder webinfFolder, String daframeLogFilePath, Properties frameworkConfProperties, Properties logConfProperties) {
		super();
		this.projectName = name;
		this.projectFolder = projectFolder;
		this.webinfFolder = webinfFolder;
		IResource tsqlFolder = DaframeSQLUtils.getResource(webinfFolder, "tsql");
		if (tsqlFolder != null) {
			this.tsqlFolder = (Folder) tsqlFolder;
		}
		this.daframeLogFilePath = daframeLogFilePath;
		this.frameworkConfProperties = frameworkConfProperties;
		this.logConfProperties = logConfProperties;
	}
	/**
	 * @return the name
	 */
	public String getName() {
		return projectName;
	}
	/**
	 * @return the webinfFolder
	 */
	public Folder getWebinfFolder() {
		return webinfFolder;
	}
	public Folder getTSQLFolder() {
		return tsqlFolder;
	}
	/**
	 * @return the properties
	 */
	public Properties getFrameworkProperties() {
		return frameworkConfProperties;
	}
	public Properties getLogConfProperties() {
		return logConfProperties;
	}
	
	public String getDaframeLogPath() {
		return this.daframeLogFilePath;
	}
}
